package cnpm02.j2ee.group3.logic.validator;

import org.hibernate.validator.Validator;

public class NumberOnlyValidator implements Validator<NumberOnly> {

	public void initialize(NumberOnly value) {
	}

	public boolean isValid(Object value) {
		try {
			Integer.parseInt(value.toString());
		} catch (Exception e) {
			return false;
		}
		
		return true;
	}

}
